import type { Result, PageResult } from '@/types/response'
import type {
  InspectionPlan,
  InspectionPlanQuery,
  InspectionPlanCreateDTO,
  InspectionPlanCreateVO,
  InspectionRecordCreateDTO,
  InspectionRecordCreateVO
} from '@/types/inspection'
import request from '@/utils/request'

// 获取巡检计划列表
export function getInspectionPlanList(params: InspectionPlanQuery) {
  return request.get<Result<PageResult<InspectionPlan>>>('/admin/inspectionPlans', { params })
}

// 创建巡检计划
export function createInspectionPlan(data: InspectionPlanCreateDTO) {
  return request.post<Result<InspectionPlanCreateVO>>('/admin/inspectionPlans', data)
}

// 提交巡检记录
export function createInspectionRecord(data: InspectionRecordCreateDTO) {
  return request.post<Result<InspectionRecordCreateVO>>('/admin/inspectionRecords', data)
} 